<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Person(name, age){
    this._init(name, age);
}

Person.prototype = {
    _init: function (name, age){
        this.name = name;
        this.age = age;

    },
    eat: function (){

    },
    speak: function (){

    }
}
var p1 = new Person("a", 20)
var p2 = new Person("b", 20)
console.log(p1.name);
console.log(p2.name);
</script>
</body>
</html>